home *** CD-ROM | disk | FTP | other *** search
- //***************************************************************************
- //
- // this file is (c) '94-'96 Niklas Beisert
- //
- // this file is part of the cubic player development kit.
- // you may only use/modify/spread this file under the terms stated
- // in the cubic player development kit accompanying documentation.
- //
- //***************************************************************************
-
- #ifndef __CBINFILE_H
- #define __CBINFILE_H
-
- #include "binfile.h"
-
- class binfilecache : public binfile
- {
- protected:
- binfile *f;
- char *buffer;
- int buflen;
- int bufpos;
- int bufread;
- long filebufpos;
- int dirty;
- long fileseekpos;
- void invalidatebuf();
-
- public:
- binfilecache();
-
- int open(binfile &fil, int len);
- virtual void close();
- virtual long read(void *buf, long len);
- virtual long write(const void *buf, long len);
- virtual long seek(long pos);
- virtual long chsize(long pos);
- };
-
- #endif
-